package com.example.roadeyeserver.controller;

import com.example.roadeyeserver.entity.rq.ShipRQ;
import com.example.roadeyeserver.entity.rq.VehicleRQ;
import com.example.roadeyeserver.handler.ProvinceCenterHandler;
import com.example.roadeyeserver.result.Result;
import com.example.roadeyeserver.util.ResultUtil;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("provinceCenter")
public class ProvinceCenterController {

    @Resource
    private ProvinceCenterHandler provinceCenterHandler;

    @PostMapping("getCrossVehicleData")
    public Result<VehicleRQ> getCrossVehicleData() {
        return ResultUtil.success(provinceCenterHandler.getCrossVehicleData());
    }

    @PostMapping("getLocalVehicleData")
    public Result<VehicleRQ> getLocalVehicleData() {
        return ResultUtil.success(provinceCenterHandler.getLocalVehicleData());
    }

    @PostMapping("getShipData")
    public Result<ShipRQ> getShipData() {
        return ResultUtil.success(provinceCenterHandler.getShipData());
    }

}
